Why do the statements say 399.0/2.0 instead of 399/2 ?
If the latter were used, the integer division would result in errors.
Here is what the applet draws. Even though it has been drawn with a series of short straight line segments, the curve looks like it should.
Can you think of ways to improve this program?